<?php
// Check if session is not registered, redirect back to main page. 
// Put this code in first line of web page. 

session_start();
if(!isset($_SESSION['myusername']))
{
header("location:index.php");
}
echo $_SESSION['myusername'];
echo $_SESSION['mypassword'];
echo $_SESSION['p'];
?>

<html>
<body>
Login Successful
<br>
Please Log Out Or Else..
<a href="logout.php">LOGOUT</a>
<br>
GO HOME
<a href="index.php">HOME</a>
</body>
</html>